package sk.tonyb.crawler;

import org.apache.log4j.Logger;

/** 
 * Class, which provides starting of crawler. 
 * 
 * @author Anton Balucha
 * @since 12.10.2011
 * @last_modified 12.10.2011
 */
public class Main implements Runnable {
	
	/** Log4j logger. */
	public static Logger logger = Logger.getLogger(Main.class);
	
	/** Constructor. */
	public Main() {
		this.init();
	}
	
	/** Method, which initialize thread of this class. */
	private synchronized void init() {

		Thread crawler = null;
		
		try {
			crawler = new Thread(this, "web crawler");
			crawler.start();
		}
		
		catch(Exception e) {
			logger.error("Exception", e);
		}
	}
	
	/** Method, which provides running of thread. */
	@Override
	public synchronized void run() {
		Executor executor = new Executor();
	}
	
	/** Method, which starts application. 
	 * @throws InterruptedException */
	public static void main(String[] args) throws InterruptedException {
		Main main = new Main();
	}
}
